#******************************************************************************
# Makefile.am (libmidipp/src)
#------------------------------------------------------------------------------
##
# \file       	Makefile.am
# \library    	libmidipp
# \author     	Chris Ahlstrom
# \date       	2014-04-22
# \updates     2014-05-02
# \version    	$Revision$
# \license    	$XPC_SUITE_GPL_LICENSE$
#
#  	This file is a makefile for the libmidipp library project.
#
#     This makefile provides the skeleton needed to build the libmidipp
#     library using GNU autotools.
#
#     The libmidipp project is the "original" libmidipp C project, with
#     the addition of the basic MIDI/Text conversion routines of the midicomp
#     project.
#
#------------------------------------------------------------------------------

#*****************************************************************************
# Packing/cleaning targets
#-----------------------------------------------------------------------------

AUTOMAKE_OPTIONS = foreign dist-zip dist-bzip2
MAINTAINERCLEANFILES = Makefile.in Makefile $(AUX_DIST)

#*****************************************************************************
# CLEANFILES includes stuff generated by the coverage/profiling options.
#-----------------------------------------------------------------------------

CLEANFILES = *.gc*

#******************************************************************************
# EXTRA_DIST
#------------------------------------------------------------------------------

EXTRA_DIST =

#*****************************************************************************
# Import version macros from configure.ac
#-----------------------------------------------------------------------------

PACKAGE = @PACKAGE@
VERSION = @VERSION@

MIDICVT_API_MAJOR = @MIDICVT_API_MAJOR@
MIDICVT_API_MINOR = @MIDICVT_API_MINOR@
MIDICVT_API_PATCH = @MIDICVT_API_PATCH@
MIDICVT_API_VERSION = @MIDICVT_API_VERSION@

MIDICVT_LT_CURRENT = @MIDICVT_LT_CURRENT@
MIDICVT_LT_REVISION = @MIDICVT_LT_REVISION@
MIDICVT_LT_AGE = @MIDICVT_LT_AGE@

#******************************************************************************
# Install directories
#------------------------------------------------------------------------------

prefix = @prefix@
libdir = @midicvtlibdir@
datadir = @datadir@
datarootdir = @datarootdir@
midicvtlibdir = @midicvtlibdir@
midicvtdocdir = @midicvtdocdir@
midicvtdoxygendir = @midicvtdoxygendir@
midicvtincludedir = @midicvtincludedir@

#******************************************************************************
# localedir
#------------------------------------------------------------------------------
#
#  'localedir' is the normal system directory for installed localization
#  files.  Not yet used.
#
#------------------------------------------------------------------------------

localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@

#******************************************************************************
# Local project directories
#------------------------------------------------------------------------------

top_srcdir = @top_srcdir@
builddir = @abs_top_builddir@

#*****************************************************************************
# libtool
#-----------------------------------------------------------------------------

version = $(MIDICVT_API_MAJOR):$(MIDICVT_API_MINOR):$(MIDICVT_API_PATCH)

#******************************************************************************
# AM_CPPFLAGS [formerly "INCLUDES"]
#------------------------------------------------------------------------------
#
#		Defines where to look for header files.
#
#------------------------------------------------------------------------------

AM_CPPFLAGS = \
 -I$(top_srcdir)/include \
 -I$(top_srcdir)/libmidifilex/include \
 -I$(top_srcdir)/libmidipp/include

#******************************************************************************
# Building the library
#------------------------------------------------------------------------------
#
# 		We put library files in the src directory.
#
# 		The static library setup is not needed, since libtool also builds the
#		static version.
#
#------------------------------------------------------------------------------

lib_LTLIBRARIES = libmidipp.la

#******************************************************************************
# SOURCES
#------------------------------------------------------------------------------

libmidipp_la_SOURCES = \
 csvarray.cpp \
 initree.cpp \
 iniwriting.cpp \
 midimapper.cpp \
 stringmap.cpp

libmidipp_la_LDFLAGS = -version-info $(version)

# libmidipp_la_DEPENDENCIES = 
# ../include/csvarray.hpp 
# ../include/initree.hpp 
# ../include/iniwriting.hpp 
# ../include/midimapper.hpp 
# ../include/stringmap.hpp

#******************************************************************************
# uninstall-hook
#------------------------------------------------------------------------------
#
#     We'd like to remove /usr/local/include/midicvt-1.0 if it is
#     empty.  However, we don't have a good way to do it yet.
#
#------------------------------------------------------------------------------

uninstall-hook:
	@echo "Note:  you may want to remove $(libdir) manually"

#******************************************************************************
# Debugging targets
#------------------------------------------------------------------------------

show:
	@echo "Install directories:"
	@echo
	@echo "prefix        = $(prefix)"
	@echo "datadir       = $(datadir)"
	@echo "datarootdir   = $(datarootdir)"
	@echo "libdir        = $(libdir)"
	@echo "midicvtlibdir     = $(midicvtlibdir)"
	@echo "midicvtdocdir     = $(midicvtdocdir)"
	@echo "midicvtdoxygendir = $(midicvtdoxygendir)"
	@echo "midicvtincludedir = $(midicvtincludedir)"
	@echo "localedir     = $(localedir)"
	@echo
	@echo "Local directories:"
	@echo
	@echo "top_srcdir    = $(top_srcdir) [XPC Basic root directory]"
	@echo "srcdir    		= $(srcdir)"
	@echo "top_builddir  = $(top_builddir)"
	@echo "builddir      = $(builddir)"

#******************************************************************************
# Makefile.am (libmidipp/src)
#------------------------------------------------------------------------------
# Local Variables:
# End:
#------------------------------------------------------------------------------
# vim: ts=3 sw=3 noet ft=automake
#------------------------------------------------------------------------------
